print("Example script dk_xiee.lua.");
local scheme = ut.newSpellQueue()
local function getEnergy()
    return UnitPower('player')
end
local function getRunes( )
	-- body
	-- return UnitPower('player', 5)
	local ret = 0
	for i=1, 6 do
		local _, _, enable = GetRuneCooldown(i)
		if enable then
			ret = ret + 1
		end
	end
	return ret
end

scheme.add('爆发', 'target', function( )
    return getDebuffRemainTime('target', '恶性瘟疫') == 0
end)

scheme.add('凋零缠绕', 'target', function( )
    return UnitBuff('player', '末日突降') or getEnergy() > 80 
end)

scheme.add('脓疮打击', 'target', function( )
    return getDebuffRemainTime('target', '溃烂之伤') < 2
end)
scheme.add('天灾打击', 'target', function( )
    return getRunes() > 1
end)

scheme.add('凋零缠绕', 'target')


do
return scheme
end
----------------------------------------
local curScheme = Scheme.new()
schemeMap[63] = curScheme

local AnYingDaJi = CLASS(Spell)
AnYingDaJi.name = '暗影打击'

function AnYingDaJi:canCast( )
	-- body
	return getDebuffRemainTime('target', '死疽') == 0
end

-------------------------
local LingHuiShouGe = CLASS(Spell)
LingHuiShouGe.name = '灵魂收割'

function LingHuiShouGe:canCast( )
	-- body
	return getHpParent( 'target' ) < 0.48
end

---------------------------
local TianZaiDaJi = CLASS(Spell)
TianZaiDaJi.name = '天灾打击'

------------------------------------
local NongCangDaJi = CLASS(Spell)
NongCangDaJi.name = '脓疮打击'   

-------------------------------------
local DiaoLingChanRao = CLASS(Spell)
DiaoLingChanRao.name = '凋零缠绕'

----------------------------------
local HeiAnTuBian = CLASS(Spell)
HeiAnTuBian.name = '黑暗突变'

----------------------------------
local SiWangHongXi = CLASS(Spell)
SiWangHongXi.name = '死亡虹吸'
function SiWangHongXi:canCast( )
	return getHpParent( 'player' ) < 0.5
end

function SiWangHongXi:checkDistance(  )
	return true
end

------------------------------------
local XinLingBingDong = CLASS(Spell)
XinLingBingDong.name = '心灵冰冻'

------------------------------------
local JiaoXi = CLASS(Spell)
JiaoXi.name = '绞袭'

------------------------------------
local SiWangZhiWo = CLASS(Spell)
SiWangZhiWo.name = '死亡之握'

curScheme:addSpell(HeiAnTuBian.new())
curScheme:addSpell(LingHuiShouGe.new())
curScheme:addSpell(AnYingDaJi.new())
curScheme:addSpell(SiWangHongXi.new())
curScheme:addSpell(TianZaiDaJi.new())
curScheme:addSpell(NongCangDaJi.new())
curScheme:addSpell(DiaoLingChanRao.new())

curScheme:addInterruptSpell(XinLingBingDong.new())
curScheme:addInterruptSpell(JiaoXi.new())
curScheme:addInterruptSpell(SiWangZhiWo.new())



